package main.java.com.example.demo.innoket.util;



/**
 * 生成文件的文件类型
 *
 */
public enum FileType {
	ENTITY("entity", Resources.ENTITY_TEMPLATE,".java"),
	MODEL("model", Resources.MODEL_TEMPLATE,"Model.java"),
	DAO("dao", Resources.DAO_TEMPLATE,"Mapper.java"),
	MAPPER("mapper", Resources.MAPPER_TEMPLATE,"Mapper.xml"),
	SERVICE("service",Resources.SERVICE_TEMPLATE,"Service.java"),
	SERVICE_IMPL("service.impl", Resources.SERVICE_IMPL_TEMPLATE,"ServiceImpl.java"),
	DUBBOPROVIDER("provider", Resources.PROVIDER_TEMPLATE,"Provider.java"),
	CONTROLLER("controller.admin", Resources.CONTROLLER_TEMPLATE,"Controller.java"),
	CONFIG("mq.config", Resources.CONFIG_TEMPLATE,"Config.java"),
	RECEVIER("mq.receiver", Resources.RECEVIER_TEMPLATE,"Receiver.java"),
	CONTROLLER_API("api.controller", Resources.CONTROLLER_API_TEMPLATE,"ApiController.java"),
	VO("vo", Resources.VO_TEMPLATE,"Vo.java"),

	JSP_LIST_FILE("jsp_list_file", Resources.JSP_LIST_FILE_TEMPLATE,"_list.jsp"),
	JS_LIST_FILE("js_list_file",Resources.JS_LIST_FILE_TEMPLATE,"_list.js"),

	JS_ADD_FILE("list_jsp_file", Resources.JS_ADD_FILE_TEMPLATE,"_add.js"),
	JS_VIEW_FILE("list_js_file",Resources.JS_VIEW_FILE_TEMPLATE,"_view.js"),
	JSP_ADD_FILE("list_jsp_file", Resources.JSP_ADD_FILE_TEMPLATE,"_add.jsp"),
	JSP_VIEW_FILE("list_js_file",Resources.JSP_VIEW_FILE_TEMPLATE,"_view.jsp");


	// 成员变量
	private String type;//文件类型
	//	private String pakage;//包声明
	private String template;//模板
	private String fileNameExtension;//文件扩展

	// 构造方法
	private FileType(String type,String template,String fileNameExtension) {
		this.type = type;
		this.template=template;
		this.fileNameExtension=fileNameExtension;
	}

	public String getType() {
		return type;
	}

	public String getTemplate(){
		return template;
	}

	public String getFileNameExtension(){
		return fileNameExtension;
	}

	public static void main(String[] args) {
		System.out.println(FileType.ENTITY.getTemplate());
	}

}
